﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Sbook.Data;
using Sbook.Business;
using Sbook.Library;
namespace Sbook
{
    public partial class Demo : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
           
                string user = Request.QueryString["user"];
                string pass = Request.QueryString["pass"];
                if (!Business.UserService.isLogin(user, pass))
                {
                    Response.Write("<script>alert('Dang nhap khong thanh cong'); window.location.href='index.aspx';</script>");
                }
                else
                {
                    Data.Mysession.Session = Business.UserService.User_GetByUserPass(user, pass)[0];
                    Response.Redirect("index.aspx");
                }
            
        }
    }
}